assume cs:code
data segment
  dd 16,0,22,0,382,0,1356,0,2390,0,8000,0,16000,0
  dd 24486,0,50065,0,97479,0,140417,0,197514,0
  dd 345980,0,590827,0,803530,0,1183000,0,1843000,0
  dd 2759000,0,3753000,0,4649000,0,5937000,0
data ends
code segment

     start: mov ax,data
            mov ds,ax
            mov si,0
            mov cx,21
      sss1: call data_show
            add si,8
            loop sss1

            mov si,0
            mov dh,3
            mov dl,13
            mov bl,2
            mov cx,21
      sss2: call show_str
            inc dh
            add si,8
            loop sss2

            mov ax,4c00h
            int 21h

 data_show: push cx
            push si
            push dx
            push ax
            push bx
            mov ax,ds:[si]
            mov dx,ds:[si+2]

            mov di,0
        s1: mov cx,10
            call divdw
            inc di
            mov bx,cx
            mov cx,ax
            jcxz s2
            add bx,30h
            push bx
            jmp short s1
        s2: add bx,30h
            push bx

            mov cx,di
        s3: pop bx
            mov ds:[si],bl
            add si,1
            loop s3

            pop bx
            pop ax
            pop dx
            pop si
            pop cx
            ret

  show_str: push ax
            push bx
            push bp
            push cx
            push dx
            push di
            push si
            mov ax,0B800h
            mov es,ax
            sub dh,1
            mov ah,0
            mov al,0a0h
            mul dh
            mov bp,ax
            mov ah,0
            mov al,2
            sub dl,1
            mul dl
            add bp,ax
            mov di,0
            mov al,bl
       sss: mov ch,0
            mov cl,ds:[si]
            jcxz s
            mov es:[bp+di],cl
            add si,1
            mov es:[bp+di+01h],al
            add di,2
            jmp short sss 
         s: pop si
            pop di
            pop dx
            pop cx
            pop bp
            pop bx
            pop ax
            ret

     divdw: push bx
            push si
            mov si,ax
            mov ax,dx
            mov dx,0
            div cx
            mov bx,ax
            mov ax,si
            div cx
            mov cx,dx
            mov dx,bx
            pop si
            pop bx
            ret
code ends
end start
